from tree import *
li2=[]
li3=[]
def bfs(node):
    if not node:
        return
    li2.append(node)
    while li2:
        temp=li2.pop(0)
        '''
        temp=li2[0]
        li2.remove(li2[0])
        '''
        li3.append(temp.data)
        if not temp.left:
            li2.append(temp.left)
        if(temp.right!=None):
            li2.append(temp.right)
        pass

bfs(tree.node)